import Taro, { Component } from '@tarojs/taro'
import { View, Text,Image} from '@tarojs/components'
import './teamlist.css'
import { AtList, AtListItem } from "taro-ui" 
import { $navigateTo ,getGlobalData} from '../../../global';
import reactMixin from 'react-mixin';
import myJs from './teamlistJs.js'
import app from '../../../main.js'

export default class TeamList extends Component {

  config = {
    navigationBarTitleText: '团队列表'
  }
  constructor () { 
        super(...arguments); 
        this.state = this.getData(); 
    }
  init() { }

  go(url){
    $navigateTo(url);
  }

  render () {
    return (
      <View className='team-list'>
        <AtList className='list'>
        <Image src={getGlobalData('baseurl')+'img/jiahaoyou.png'} className='add' onClick={this.go.bind(this,'../../patientlables/pages/teaminvite/teaminvite?page=teamlist')}></Image>
        <AtListItem  title={'团队名称:'+this.state.doctor_contact.member_name}  note='团队成员：' onClick={this.go.bind(this,'../../patientlables/pages/teaminvite/teaminvite?page=teamlist')}/>
        {this.state.doctor_contacts.items.map((item) =>
        <AtListItem title={item.member_name}  thumb={item.member_head_image}/>
        )}
        </AtList>
      </View>
    )
  }
}
reactMixin.onClass(TeamList,myJs);
